var express = require('express');
var router = express.Router();
var createtoken = require('../utils/createToken')
//用户重新登录
module.exports = function (req, res) {
    res.send({
        code: 1,
        user: {
            username: req.user.username,
            id: req.user._id,
            token: createtoken.createToken(req.user.username, req.user._id)
        }
    })
}